// $ANTLR 3.2 Sep 23, 2009 12:02:23 C:\\Users\\Admin\\Desktop\\DotCsharp.g 2010-05-09 16:03:37


	using System.Collections.Generic;
	using SilverlightGraph.Graph;


using System;
using Antlr.Runtime;
using IList 		= System.Collections.IList;
using Stack 		= Antlr.Runtime.Collections.StackList;

using IDictionary	= System.Collections.IDictionary;

public class DotCsharpParser : Parser 
{
    public static readonly string[] tokenNames = new string[] 
	{
        "<invalid>", 
		"<EOR>", 
		"<DOWN>", 
		"<UP>", 
		"ID", 
		"FLOAT", 
		"STRING", 
		"EXPONENT", 
		"COMMENT", 
		"WS", 
		"ESC_SEQ", 
		"HEX_DIGIT", 
		"UNICODE_ESC", 
		"OCTAL_ESC", 
		"'strict'", 
		"'graph'", 
		"'digraph'", 
		"'{'", 
		"'}'", 
		"';'", 
		"'='", 
		"'node'", 
		"'edge'", 
		"'subgraph'", 
		"'['", 
		"']'", 
		"','", 
		"'--'", 
		"'->'", 
		"':'", 
		"'n'", 
		"'ne'", 
		"'e'", 
		"'se'", 
		"'s'", 
		"'sw'", 
		"'w'", 
		"'nw'"
    };

    public const int EXPONENT = 7;
    public const int T__29 = 29;
    public const int T__28 = 28;
    public const int T__27 = 27;
    public const int T__26 = 26;
    public const int T__25 = 25;
    public const int T__24 = 24;
    public const int T__23 = 23;
    public const int T__22 = 22;
    public const int T__21 = 21;
    public const int UNICODE_ESC = 12;
    public const int T__20 = 20;
    public const int OCTAL_ESC = 13;
    public const int HEX_DIGIT = 11;
    public const int FLOAT = 5;
    public const int ID = 4;
    public const int EOF = -1;
    public const int T__30 = 30;
    public const int T__19 = 19;
    public const int T__31 = 31;
    public const int T__32 = 32;
    public const int ESC_SEQ = 10;
    public const int WS = 9;
    public const int T__33 = 33;
    public const int T__16 = 16;
    public const int T__34 = 34;
    public const int T__15 = 15;
    public const int T__35 = 35;
    public const int T__18 = 18;
    public const int T__36 = 36;
    public const int T__17 = 17;
    public const int T__37 = 37;
    public const int T__14 = 14;
    public const int COMMENT = 8;
    public const int STRING = 6;

    // delegates
    // delegators



        public DotCsharpParser(ITokenStream input)
    		: this(input, new RecognizerSharedState()) {
        }

        public DotCsharpParser(ITokenStream input, RecognizerSharedState state)
    		: base(input, state) {
            InitializeCyclicDFAs();

             
       }
        

    override public string[] TokenNames {
		get { return DotCsharpParser.tokenNames; }
    }

    override public string GrammarFileName {
		get { return "C:\\Users\\Admin\\Desktop\\DotCsharp.g"; }
    }


    	string nodeId = "";
    	string nodeSource = "", nodeTarget = "";
    	double graph_width, graph_height;
    	List<Node> nodes = new List<Node>(); List<Edge> edges = new List<Edge>();
    	
    List<RecognitionException> exceptions = new List<RecognitionException>();

    public override void ReportError(RecognitionException e)
    {
        exceptions.Add(e);
    }

    public bool HasError
    {
    	get { return exceptions.Count > 0; }
    }

    public string ErrorMessage
    {
    	get { return this.GetErrorMessage(exceptions[0] as RecognitionException, this.TokenNames); }
    }

    public string ErrorPosition
    {
    	get { return this.GetErrorHeader(exceptions[0] as RecognitionException); }
    }





    // $ANTLR start "graph"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:45:1: graph returns [ Graph1 ParsedGraph] : ( 'strict' )? ( 'graph' | 'digraph' ) ( ID )? '{' stmt_list '}' ;
    public Graph1 graph() // throws RecognitionException [1]
    {   
        Graph1 ParsedGraph = null;

        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:46:2: ( ( 'strict' )? ( 'graph' | 'digraph' ) ( ID )? '{' stmt_list '}' )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:46:4: ( 'strict' )? ( 'graph' | 'digraph' ) ( ID )? '{' stmt_list '}'
            {
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:46:4: ( 'strict' )?
            	int alt1 = 2;
            	int LA1_0 = input.LA(1);

            	if ( (LA1_0 == 14) )
            	{
            	    alt1 = 1;
            	}
            	switch (alt1) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: 'strict'
            	        {
            	        	Match(input,14,FOLLOW_14_in_graph47); if (state.failed) return ParsedGraph;

            	        }
            	        break;

            	}

            	if ( (input.LA(1) >= 15 && input.LA(1) <= 16) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ParsedGraph;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}

            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:46:36: ( ID )?
            	int alt2 = 2;
            	int LA2_0 = input.LA(1);

            	if ( (LA2_0 == ID) )
            	{
            	    alt2 = 1;
            	}
            	switch (alt2) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: ID
            	        {
            	        	Match(input,ID,FOLLOW_ID_in_graph58); if (state.failed) return ParsedGraph;

            	        }
            	        break;

            	}

            	Match(input,17,FOLLOW_17_in_graph61); if (state.failed) return ParsedGraph;
            	PushFollow(FOLLOW_stmt_list_in_graph63);
            	stmt_list();
            	state.followingStackPointer--;
            	if (state.failed) return ParsedGraph;
            	Match(input,18,FOLLOW_18_in_graph65); if (state.failed) return ParsedGraph;
            	if ( (state.backtracking==0) )
            	{
            	   ParsedGraph = new Graph1(nodes, edges, graph_width, graph_height);
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ParsedGraph;
    }
    // $ANTLR end "graph"


    // $ANTLR start "stmt_list"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:50:1: stmt_list : ( stmt ( ';' )? )* ;
    public void stmt_list() // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:51:2: ( ( stmt ( ';' )? )* )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:51:4: ( stmt ( ';' )? )*
            {
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:51:4: ( stmt ( ';' )? )*
            	do 
            	{
            	    int alt4 = 2;
            	    int LA4_0 = input.LA(1);

            	    if ( (LA4_0 == ID || LA4_0 == 15 || LA4_0 == 17 || (LA4_0 >= 21 && LA4_0 <= 23)) )
            	    {
            	        alt4 = 1;
            	    }


            	    switch (alt4) 
            		{
            			case 1 :
            			    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:51:5: stmt ( ';' )?
            			    {
            			    	PushFollow(FOLLOW_stmt_in_stmt_list81);
            			    	stmt();
            			    	state.followingStackPointer--;
            			    	if (state.failed) return ;
            			    	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:51:10: ( ';' )?
            			    	int alt3 = 2;
            			    	int LA3_0 = input.LA(1);

            			    	if ( (LA3_0 == 19) )
            			    	{
            			    	    alt3 = 1;
            			    	}
            			    	switch (alt3) 
            			    	{
            			    	    case 1 :
            			    	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: ';'
            			    	        {
            			    	        	Match(input,19,FOLLOW_19_in_stmt_list83); if (state.failed) return ;

            			    	        }
            			    	        break;

            			    	}


            			    }
            			    break;

            			default:
            			    goto loop4;
            	    }
            	} while (true);

            	loop4:
            		;	// Stops C# compiler whining that label 'loop4' has no statements


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "stmt_list"


    // $ANTLR start "stmt"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:54:1: stmt : ( node_stmt | edge_stmt | attr_stmt | ID '=' ID | subgraph );
    public void stmt() // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:54:6: ( node_stmt | edge_stmt | attr_stmt | ID '=' ID | subgraph )
            int alt5 = 5;
            alt5 = dfa5.Predict(input);
            switch (alt5) 
            {
                case 1 :
                    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:54:8: node_stmt
                    {
                    	PushFollow(FOLLOW_node_stmt_in_stmt96);
                    	node_stmt();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:55:4: edge_stmt
                    {
                    	PushFollow(FOLLOW_edge_stmt_in_stmt101);
                    	edge_stmt();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 3 :
                    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:56:4: attr_stmt
                    {
                    	PushFollow(FOLLOW_attr_stmt_in_stmt106);
                    	attr_stmt();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;
                case 4 :
                    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:57:5: ID '=' ID
                    {
                    	Match(input,ID,FOLLOW_ID_in_stmt112); if (state.failed) return ;
                    	Match(input,20,FOLLOW_20_in_stmt114); if (state.failed) return ;
                    	Match(input,ID,FOLLOW_ID_in_stmt116); if (state.failed) return ;

                    }
                    break;
                case 5 :
                    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:58:4: subgraph
                    {
                    	PushFollow(FOLLOW_subgraph_in_stmt121);
                    	subgraph();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "stmt"


    // $ANTLR start "node_stmt"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:61:1: node_stmt : n= node_id ( attr_list[true, false] )? ;
    public void node_stmt() // throws RecognitionException [1]
    {   
        String n = null;


        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:62:2: (n= node_id ( attr_list[true, false] )? )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:62:4: n= node_id ( attr_list[true, false] )?
            {
            	PushFollow(FOLLOW_node_id_in_node_stmt134);
            	n = node_id();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	if ( (state.backtracking==0) )
            	{
            	   nodeId = n; 
            	}
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:62:36: ( attr_list[true, false] )?
            	int alt6 = 2;
            	int LA6_0 = input.LA(1);

            	if ( (LA6_0 == 24) )
            	{
            	    alt6 = 1;
            	}
            	switch (alt6) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: attr_list[true, false]
            	        {
            	        	PushFollow(FOLLOW_attr_list_in_node_stmt138);
            	        	attr_list(true, false);
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;

            	        }
            	        break;

            	}

            	if ( (state.backtracking==0) )
            	{
            	     nodeId = "";
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "node_stmt"


    // $ANTLR start "edge_stmt"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:65:1: edge_stmt : ( node_id | subgraph ) edgeRHS ( attr_list[false, true] )? ;
    public void edge_stmt() // throws RecognitionException [1]
    {   
        String node_id1 = null;


        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:66:2: ( ( node_id | subgraph ) edgeRHS ( attr_list[false, true] )? )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:66:4: ( node_id | subgraph ) edgeRHS ( attr_list[false, true] )?
            {
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:66:4: ( node_id | subgraph )
            	int alt7 = 2;
            	int LA7_0 = input.LA(1);

            	if ( (LA7_0 == ID) )
            	{
            	    alt7 = 1;
            	}
            	else if ( (LA7_0 == 17 || LA7_0 == 23) )
            	{
            	    alt7 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    NoViableAltException nvae_d7s0 =
            	        new NoViableAltException("", 7, 0, input);

            	    throw nvae_d7s0;
            	}
            	switch (alt7) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:66:5: node_id
            	        {
            	        	PushFollow(FOLLOW_node_id_in_edge_stmt154);
            	        	node_id1 = node_id();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;
            	        	if ( (state.backtracking==0) )
            	        	{
            	        	   nodeSource = node_id1; 
            	        	}

            	        }
            	        break;
            	    case 2 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:66:47: subgraph
            	        {
            	        	PushFollow(FOLLOW_subgraph_in_edge_stmt160);
            	        	subgraph();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;

            	        }
            	        break;

            	}

            	PushFollow(FOLLOW_edgeRHS_in_edge_stmt163);
            	edgeRHS();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:66:65: ( attr_list[false, true] )?
            	int alt8 = 2;
            	int LA8_0 = input.LA(1);

            	if ( (LA8_0 == 24) )
            	{
            	    alt8 = 1;
            	}
            	switch (alt8) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: attr_list[false, true]
            	        {
            	        	PushFollow(FOLLOW_attr_list_in_edge_stmt165);
            	        	attr_list(false, true);
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;

            	        }
            	        break;

            	}

            	if ( (state.backtracking==0) )
            	{
            	   nodeSource = ""; nodeTarget = ""; 
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "edge_stmt"


    // $ANTLR start "edgeRHS"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:70:1: edgeRHS : edgeop ( node_id | subgraph ) ( edgeRHS )? ;
    public void edgeRHS() // throws RecognitionException [1]
    {   
        String node_id2 = null;


        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:70:9: ( edgeop ( node_id | subgraph ) ( edgeRHS )? )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:70:11: edgeop ( node_id | subgraph ) ( edgeRHS )?
            {
            	PushFollow(FOLLOW_edgeop_in_edgeRHS181);
            	edgeop();
            	state.followingStackPointer--;
            	if (state.failed) return ;
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:70:18: ( node_id | subgraph )
            	int alt9 = 2;
            	int LA9_0 = input.LA(1);

            	if ( (LA9_0 == ID) )
            	{
            	    alt9 = 1;
            	}
            	else if ( (LA9_0 == 17 || LA9_0 == 23) )
            	{
            	    alt9 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    NoViableAltException nvae_d9s0 =
            	        new NoViableAltException("", 9, 0, input);

            	    throw nvae_d9s0;
            	}
            	switch (alt9) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:70:19: node_id
            	        {
            	        	PushFollow(FOLLOW_node_id_in_edgeRHS184);
            	        	node_id2 = node_id();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;
            	        	if ( (state.backtracking==0) )
            	        	{
            	        	   nodeTarget = node_id2; 
            	        	}

            	        }
            	        break;
            	    case 2 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:70:61: subgraph
            	        {
            	        	PushFollow(FOLLOW_subgraph_in_edgeRHS190);
            	        	subgraph();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;

            	        }
            	        break;

            	}

            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:70:71: ( edgeRHS )?
            	int alt10 = 2;
            	alt10 = dfa10.Predict(input);
            	switch (alt10) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: edgeRHS
            	        {
            	        	PushFollow(FOLLOW_edgeRHS_in_edgeRHS193);
            	        	edgeRHS();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return ;

            	        }
            	        break;

            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "edgeRHS"


    // $ANTLR start "attr_stmt"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:73:1: attr_stmt : ( 'graph' | 'node' | 'edge' ) attr_list[false,false] ;
    public void attr_stmt() // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:74:2: ( ( 'graph' | 'node' | 'edge' ) attr_list[false,false] )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:74:4: ( 'graph' | 'node' | 'edge' ) attr_list[false,false]
            {
            	if ( input.LA(1) == 15 || (input.LA(1) >= 21 && input.LA(1) <= 22) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}

            	PushFollow(FOLLOW_attr_list_in_attr_stmt218);
            	attr_list(false, false);
            	state.followingStackPointer--;
            	if (state.failed) return ;

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "attr_stmt"


    // $ANTLR start "subgraph"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:1: subgraph : ( ( 'subgraph' ( ID )? )? '{' stmt_list '}' | 'subgraph' ID );
    public void subgraph() // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:9: ( ( 'subgraph' ( ID )? )? '{' stmt_list '}' | 'subgraph' ID )
            int alt13 = 2;
            alt13 = dfa13.Predict(input);
            switch (alt13) 
            {
                case 1 :
                    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:11: ( 'subgraph' ( ID )? )? '{' stmt_list '}'
                    {
                    	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:11: ( 'subgraph' ( ID )? )?
                    	int alt12 = 2;
                    	int LA12_0 = input.LA(1);

                    	if ( (LA12_0 == 23) )
                    	{
                    	    alt12 = 1;
                    	}
                    	switch (alt12) 
                    	{
                    	    case 1 :
                    	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:12: 'subgraph' ( ID )?
                    	        {
                    	        	Match(input,23,FOLLOW_23_in_subgraph229); if (state.failed) return ;
                    	        	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:23: ( ID )?
                    	        	int alt11 = 2;
                    	        	int LA11_0 = input.LA(1);

                    	        	if ( (LA11_0 == ID) )
                    	        	{
                    	        	    alt11 = 1;
                    	        	}
                    	        	switch (alt11) 
                    	        	{
                    	        	    case 1 :
                    	        	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: ID
                    	        	        {
                    	        	        	Match(input,ID,FOLLOW_ID_in_subgraph231); if (state.failed) return ;

                    	        	        }
                    	        	        break;

                    	        	}


                    	        }
                    	        break;

                    	}

                    	Match(input,17,FOLLOW_17_in_subgraph236); if (state.failed) return ;
                    	PushFollow(FOLLOW_stmt_list_in_subgraph238);
                    	stmt_list();
                    	state.followingStackPointer--;
                    	if (state.failed) return ;
                    	Match(input,18,FOLLOW_18_in_subgraph240); if (state.failed) return ;

                    }
                    break;
                case 2 :
                    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:78:4: 'subgraph' ID
                    {
                    	Match(input,23,FOLLOW_23_in_subgraph245); if (state.failed) return ;
                    	Match(input,ID,FOLLOW_ID_in_subgraph247); if (state.failed) return ;

                    }
                    break;

            }
        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "subgraph"


    // $ANTLR start "attr_list"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:81:1: attr_list[bool isNode, bool isEdge] : ( '[' ( a_list[isNode, isEdge] )? ']' )+ ;
    public void attr_list(bool isNode, bool isEdge) // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:82:2: ( ( '[' ( a_list[isNode, isEdge] )? ']' )+ )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:82:4: ( '[' ( a_list[isNode, isEdge] )? ']' )+
            {
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:82:4: ( '[' ( a_list[isNode, isEdge] )? ']' )+
            	int cnt15 = 0;
            	do 
            	{
            	    int alt15 = 2;
            	    int LA15_0 = input.LA(1);

            	    if ( (LA15_0 == 24) )
            	    {
            	        alt15 = 1;
            	    }


            	    switch (alt15) 
            		{
            			case 1 :
            			    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:82:5: '[' ( a_list[isNode, isEdge] )? ']'
            			    {
            			    	Match(input,24,FOLLOW_24_in_attr_list260); if (state.failed) return ;
            			    	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:82:9: ( a_list[isNode, isEdge] )?
            			    	int alt14 = 2;
            			    	int LA14_0 = input.LA(1);

            			    	if ( (LA14_0 == ID) )
            			    	{
            			    	    alt14 = 1;
            			    	}
            			    	switch (alt14) 
            			    	{
            			    	    case 1 :
            			    	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: a_list[isNode, isEdge]
            			    	        {
            			    	        	PushFollow(FOLLOW_a_list_in_attr_list262);
            			    	        	a_list(isNode, isEdge);
            			    	        	state.followingStackPointer--;
            			    	        	if (state.failed) return ;

            			    	        }
            			    	        break;

            			    	}

            			    	Match(input,25,FOLLOW_25_in_attr_list266); if (state.failed) return ;

            			    }
            			    break;

            			default:
            			    if ( cnt15 >= 1 ) goto loop15;
            			    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            		            EarlyExitException eee15 =
            		                new EarlyExitException(15, input);
            		            throw eee15;
            	    }
            	    cnt15++;
            	} while (true);

            	loop15:
            		;	// Stops C# compiler whining that label 'loop15' has no statements


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "attr_list"


    // $ANTLR start "a_list"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:85:1: a_list[bool isNode, bool isEdge] : (n= ID ( '=' v= ID )? ( ',' )? )+ ;
    public void a_list(bool isNode, bool isEdge) // throws RecognitionException [1]
    {   
        IToken n = null;
        IToken v = null;

         string label = ""; double width = 0.0, height = 0.0, label_x = 0.0, label_y = 0.0, label_width = 0.0, x = 0.0, y = 0.0; 
        	List<SilverlightGraph.Graph.Attribute> attributes = new List<SilverlightGraph.Graph.Attribute>(); 
        	List<Pair> points = new List<Pair>(), arrow = new List<Pair>();
              
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:90:1: ( (n= ID ( '=' v= ID )? ( ',' )? )+ )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:90:3: (n= ID ( '=' v= ID )? ( ',' )? )+
            {
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:90:3: (n= ID ( '=' v= ID )? ( ',' )? )+
            	int cnt18 = 0;
            	do 
            	{
            	    int alt18 = 2;
            	    int LA18_0 = input.LA(1);

            	    if ( (LA18_0 == ID) )
            	    {
            	        alt18 = 1;
            	    }


            	    switch (alt18) 
            		{
            			case 1 :
            			    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:90:4: n= ID ( '=' v= ID )? ( ',' )?
            			    {
            			    	n=(IToken)Match(input,ID,FOLLOW_ID_in_a_list287); if (state.failed) return ;
            			    	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:90:9: ( '=' v= ID )?
            			    	int alt16 = 2;
            			    	int LA16_0 = input.LA(1);

            			    	if ( (LA16_0 == 20) )
            			    	{
            			    	    alt16 = 1;
            			    	}
            			    	switch (alt16) 
            			    	{
            			    	    case 1 :
            			    	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:90:10: '=' v= ID
            			    	        {
            			    	        	Match(input,20,FOLLOW_20_in_a_list290); if (state.failed) return ;
            			    	        	v=(IToken)Match(input,ID,FOLLOW_ID_in_a_list294); if (state.failed) return ;
            			    	        	if ( (state.backtracking==0) )
            			    	        	{
            			    	        	   if (isNode) {		
            			    	        	  			if (((n != null) ? n.Text : null).Equals("label"))
            			    	        	  			{
            			    	        	  				label = ((v != null) ? v.Text : null).Replace("\"","");
            			    	        	  			}
            			    	        	  			else if (((n != null) ? n.Text : null).Equals("width"))
            			    	        	  			{
            			    	        	  				width = double.Parse(((v != null) ? v.Text : null).Replace("\"","").Replace(".",","));
            			    	        	  			}
            			    	        	  			else if (((n != null) ? n.Text : null).Equals("height"))
            			    	        	  			{
            			    	        	  				height = double.Parse(((v != null) ? v.Text : null).Replace("\"","").Replace(".",","));
            			    	        	  			}
            			    	        	  			else if (((n != null) ? n.Text : null).Equals("pos"))
            			    	        	  			{
            			    	        	  				string pos = ((v != null) ? v.Text : null).Replace("\"","");
            			    	        	  				string[] words = pos.Split(',');

            			    	        	  				x = double.Parse(words[0].Replace(".",","));
            			    	        	  				y = double.Parse(words[1].Replace(".",","));
            			    	        	  			}
            			    	        	  			else if (((n != null) ? n.Text : null).Equals("_ldraw_"))
            			    	        	  		  		{
            			    	        	  		  			string ldraw = ((v != null) ? v.Text : null).Replace("\"","");
            			    	        	  		  			string[] words = ldraw.Replace(" T ","_").Split('_');
            			    	        	  		  			string[] values = words[1].Split(' ');
            			    	        	  		  			label_x = double.Parse(values[0].Replace(".",",")); // 0 contains ""
            			    	        	  		  			label_y = double.Parse(values[1].Replace(".",",")); 
            			    	        	  		  			label_width = double.Parse(values[3].Replace(".",",")); 		  			
            			    	        	  		  		}
            			    	        	  			else {
            			    	        	  				SilverlightGraph.Graph.Attribute attr = new SilverlightGraph.Graph.Attribute(((n != null) ? n.Text : null),((v != null) ? v.Text : null));
            			    	        	  				attributes.Add(attr);
            			    	        	  			}
            			    	        	  		  }
            			    	        	  		  else if (isEdge) {
            			    	        	  		  		if (((n != null) ? n.Text : null).Equals("label"))
            			    	        	  		  		{
            			    	        	  					label = ((v != null) ? v.Text : null).Replace("\"","");		  		
            			    	        	  		  		}
            			    	        	  		  		else if (((n != null) ? n.Text : null).Equals("_ldraw_"))
            			    	        	  		  		{
            			    	        	  		  			string ldraw = ((v != null) ? v.Text : null).Replace("\"","");
            			    	        	  		  			string[] words = ldraw.Replace(" T ","_").Split('_');
            			    	        	  		  			string[] values = words[1].Split(' ');
            			    	        	  		  			label_x = double.Parse(values[0].Replace(".",",")); // 0 contains ""
            			    	        	  		  			label_y = double.Parse(values[1].Replace(".",",")); 
            			    	        	  		  			label_width = double.Parse(values[3].Replace(".",",")); 		  					  			
            			    	        	  		  		}
            			    	        	  		  		else if (((n != null) ? n.Text : null).Equals("_draw_"))
            			    	        	  		  		{
            			    	        	  		  			string pos = ((v != null) ? v.Text : null).Replace("\"","");
            			    	        	  					string[] words = pos.Split('B');
            			    	        	  		  			string[] values = words[1].Split(' ');
            			    	        	  		  			int num = int.Parse(values[1]); // 0 contains ""
            			    	        	  		  			int k  = 2;
            			    	        	  		  			
            			    	        	  		  			for(int i = 0; i < num; i++)
            			    	        	  					{
            			    	        	  						double x1 = double.Parse(values[k].Replace(".",","));
            			    	        	  						double y1 = double.Parse(values[k+1].Replace(".",","));
            			    	        	  						points.Add(new Pair(x1,y1));
            			    	        	  						k+=2;
            			    	        	  					}
            			    	        	  		  		}
            			    	        	  		  		else if (((n != null) ? n.Text : null).Equals("_hdraw_"))
            			    	        	  		  		{
            			    	        	  		  			string hdraw = ((v != null) ? v.Text : null).Replace("\"","");
            			    	        	  		  			string[] words = hdraw.Split('P');
            			    	        	  		  			string[] values = words[1].Split(' ');
            			    	        	  		  			int num = int.Parse(values[1]); // 0 contains ""
            			    	        	  		  			int k  = 2;
            			    	        	  		  			
            			    	        	  		  			for(int i = 0; i < num; i++)
            			    	        	  		  			{
            			    	        	  		  				double x1 = double.Parse(values[k].Replace(".",","));
            			    	        	  						double y1 = double.Parse(values[k+1].Replace(".",","));
            			    	        	  						arrow.Add(new Pair(x1,y1));
            			    	        	  						k+=2;
            			    	        	  		  			}
            			    	        	  		  		}
            			    	        	  		  		else {
            			    	        	  					SilverlightGraph.Graph.Attribute attr = new SilverlightGraph.Graph.Attribute(((n != null) ? n.Text : null),((v != null) ? v.Text : null));
            			    	        	  					attributes.Add(attr);
            			    	        	  				}
            			    	        	  			}
            			    	        	  		else {
            			    	        	  			if (((n != null) ? n.Text : null).Equals("bb"))
            			    	        	  			{
            			    	        	  				string bb = ((v != null) ? v.Text : null).Replace("\"","");
            			    	        	  				string[] words = bb.Split(',');
            			    	        	  				graph_width = double.Parse(words[2].Replace(".",","));
            			    	        	  				graph_height = double.Parse(words[3].Replace(".",","));
            			    	        	  			}
            			    	        	  		}
            			    	        	  		
            			    	        	}

            			    	        }
            			    	        break;

            			    	}

            			    	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:186:7: ( ',' )?
            			    	int alt17 = 2;
            			    	int LA17_0 = input.LA(1);

            			    	if ( (LA17_0 == 26) )
            			    	{
            			    	    alt17 = 1;
            			    	}
            			    	switch (alt17) 
            			    	{
            			    	    case 1 :
            			    	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: ','
            			    	        {
            			    	        	Match(input,26,FOLLOW_26_in_a_list303); if (state.failed) return ;

            			    	        }
            			    	        break;

            			    	}


            			    }
            			    break;

            			default:
            			    if ( cnt18 >= 1 ) goto loop18;
            			    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            		            EarlyExitException eee18 =
            		                new EarlyExitException(18, input);
            		            throw eee18;
            	    }
            	    cnt18++;
            	} while (true);

            	loop18:
            		;	// Stops C# compiler whining that label 'loop18' has no statements

            	if ( (state.backtracking==0) )
            	{

            	  			if (isNode)
            	  			{
            	  				Label l = null;
            	  				
            	  				if (!label.Equals(""))
            	  				{
            	  					l = new Label(label, label_x, label_y, label_width);
            	  				}
            	  				Node node = new Node(nodeId,l,x,y,width,height,attributes);
            	  				nodes.Add(node);
            	  				
            	  				label = "";
            	  			}
            	  			else if (isEdge)
            	  			{
            	  				Label l = null;
            	  				
            	  				if (!label.Equals(""))
            	  				{
            	  					l = new Label(label, label_x, label_y, label_width);
            	  				}
            	  				Edge edge = new Edge(nodeSource,nodeTarget,l,points,arrow,attributes);
            	  				edges.Add(edge);
            	  				
            	  				label = "";				
            	  				
            	  				int parentIndex = -1, childIndex = -1;
            	  				for (int i = 0; i < nodes.Count && parentIndex == -1; i++)
            	  				{
            	  					if (nodes[i].Name.Equals(nodeSource))
            	  					{ parentIndex = i; }
            	  				}

            	  				for (int i = 0; i < nodes.Count && childIndex == -1; i++)
            	  				{
            	  					if (nodes[i].Name.Equals(nodeTarget))
            	  					{ childIndex = i; }
            	  				}
            	  				
            	  				if (parentIndex != -1 && childIndex != -1)
            	  				{
            	  					nodes[parentIndex].Children.Add(nodes[childIndex]);
            	  				}
            	  			}
            	  		
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "a_list"


    // $ANTLR start "edgeop"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:235:1: edgeop : ( '--' | '->' );
    public void edgeop() // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:235:8: ( '--' | '->' )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:
            {
            	if ( (input.LA(1) >= 27 && input.LA(1) <= 28) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "edgeop"


    // $ANTLR start "node_id"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:239:1: node_id returns [String text] : ID ( port )? ;
    public String node_id() // throws RecognitionException [1]
    {   
        String text = null;

        IToken ID3 = null;

        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:239:30: ( ID ( port )? )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:239:32: ID ( port )?
            {
            	ID3=(IToken)Match(input,ID,FOLLOW_ID_in_node_id341); if (state.failed) return text;
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:239:35: ( port )?
            	int alt19 = 2;
            	alt19 = dfa19.Predict(input);
            	switch (alt19) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: port
            	        {
            	        	PushFollow(FOLLOW_port_in_node_id343);
            	        	port();
            	        	state.followingStackPointer--;
            	        	if (state.failed) return text;

            	        }
            	        break;

            	}

            	if ( (state.backtracking==0) )
            	{
            	   text =  ((ID3 != null) ? ID3.Text : null); 
            	}

            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return text;
    }
    // $ANTLR end "node_id"


    // $ANTLR start "port"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:1: port : ':' ( ( ID ( ':' compass_pt )? ) | ( ':' compass_pt ) ) ;
    public void port() // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:6: ( ':' ( ( ID ( ':' compass_pt )? ) | ( ':' compass_pt ) ) )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:8: ':' ( ( ID ( ':' compass_pt )? ) | ( ':' compass_pt ) )
            {
            	Match(input,29,FOLLOW_29_in_port356); if (state.failed) return ;
            	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:12: ( ( ID ( ':' compass_pt )? ) | ( ':' compass_pt ) )
            	int alt21 = 2;
            	int LA21_0 = input.LA(1);

            	if ( (LA21_0 == ID) )
            	{
            	    alt21 = 1;
            	}
            	else if ( (LA21_0 == 29) )
            	{
            	    alt21 = 2;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    NoViableAltException nvae_d21s0 =
            	        new NoViableAltException("", 21, 0, input);

            	    throw nvae_d21s0;
            	}
            	switch (alt21) 
            	{
            	    case 1 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:13: ( ID ( ':' compass_pt )? )
            	        {
            	        	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:13: ( ID ( ':' compass_pt )? )
            	        	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:14: ID ( ':' compass_pt )?
            	        	{
            	        		Match(input,ID,FOLLOW_ID_in_port360); if (state.failed) return ;
            	        		// C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:17: ( ':' compass_pt )?
            	        		int alt20 = 2;
            	        		alt20 = dfa20.Predict(input);
            	        		switch (alt20) 
            	        		{
            	        		    case 1 :
            	        		        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:18: ':' compass_pt
            	        		        {
            	        		        	Match(input,29,FOLLOW_29_in_port363); if (state.failed) return ;
            	        		        	PushFollow(FOLLOW_compass_pt_in_port365);
            	        		        	compass_pt();
            	        		        	state.followingStackPointer--;
            	        		        	if (state.failed) return ;

            	        		        }
            	        		        break;

            	        		}


            	        	}


            	        }
            	        break;
            	    case 2 :
            	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:38: ( ':' compass_pt )
            	        {
            	        	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:38: ( ':' compass_pt )
            	        	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:242:39: ':' compass_pt
            	        	{
            	        		Match(input,29,FOLLOW_29_in_port373); if (state.failed) return ;
            	        		PushFollow(FOLLOW_compass_pt_in_port375);
            	        		compass_pt();
            	        		state.followingStackPointer--;
            	        		if (state.failed) return ;

            	        	}


            	        }
            	        break;

            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "port"


    // $ANTLR start "compass_pt"
    // C:\\Users\\Admin\\Desktop\\DotCsharp.g:245:1: compass_pt : ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' );
    public void compass_pt() // throws RecognitionException [1]
    {   
        try 
    	{
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:246:2: ( 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw' )
            // C:\\Users\\Admin\\Desktop\\DotCsharp.g:
            {
            	if ( (input.LA(1) >= 30 && input.LA(1) <= 37) ) 
            	{
            	    input.Consume();
            	    state.errorRecovery = false;state.failed = false;
            	}
            	else 
            	{
            	    if ( state.backtracking > 0 ) {state.failed = true; return ;}
            	    MismatchedSetException mse = new MismatchedSetException(null,input);
            	    throw mse;
            	}


            }

        }
        catch (RecognitionException re) 
    	{
            ReportError(re);
            Recover(input,re);
        }
        finally 
    	{
        }
        return ;
    }
    // $ANTLR end "compass_pt"

    // $ANTLR start "synpred6_DotCsharp"
    public void synpred6_DotCsharp_fragment() {
        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:54:8: ( node_stmt )
        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:54:8: node_stmt
        {
        	PushFollow(FOLLOW_node_stmt_in_synpred6_DotCsharp96);
        	node_stmt();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred6_DotCsharp"

    // $ANTLR start "synpred7_DotCsharp"
    public void synpred7_DotCsharp_fragment() {
        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:55:4: ( edge_stmt )
        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:55:4: edge_stmt
        {
        	PushFollow(FOLLOW_edge_stmt_in_synpred7_DotCsharp101);
        	edge_stmt();
        	state.followingStackPointer--;
        	if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred7_DotCsharp"

    // $ANTLR start "synpred19_DotCsharp"
    public void synpred19_DotCsharp_fragment() {
        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:11: ( ( 'subgraph' ( ID )? )? '{' stmt_list '}' )
        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:11: ( 'subgraph' ( ID )? )? '{' stmt_list '}'
        {
        	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:11: ( 'subgraph' ( ID )? )?
        	int alt25 = 2;
        	int LA25_0 = input.LA(1);

        	if ( (LA25_0 == 23) )
        	{
        	    alt25 = 1;
        	}
        	switch (alt25) 
        	{
        	    case 1 :
        	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:12: 'subgraph' ( ID )?
        	        {
        	        	Match(input,23,FOLLOW_23_in_synpred19_DotCsharp229); if (state.failed) return ;
        	        	// C:\\Users\\Admin\\Desktop\\DotCsharp.g:77:23: ( ID )?
        	        	int alt24 = 2;
        	        	int LA24_0 = input.LA(1);

        	        	if ( (LA24_0 == ID) )
        	        	{
        	        	    alt24 = 1;
        	        	}
        	        	switch (alt24) 
        	        	{
        	        	    case 1 :
        	        	        // C:\\Users\\Admin\\Desktop\\DotCsharp.g:0:0: ID
        	        	        {
        	        	        	Match(input,ID,FOLLOW_ID_in_synpred19_DotCsharp231); if (state.failed) return ;

        	        	        }
        	        	        break;

        	        	}


        	        }
        	        break;

        	}

        	Match(input,17,FOLLOW_17_in_synpred19_DotCsharp236); if (state.failed) return ;
        	PushFollow(FOLLOW_stmt_list_in_synpred19_DotCsharp238);
        	stmt_list();
        	state.followingStackPointer--;
        	if (state.failed) return ;
        	Match(input,18,FOLLOW_18_in_synpred19_DotCsharp240); if (state.failed) return ;

        }
    }
    // $ANTLR end "synpred19_DotCsharp"

    // Delegated rules

   	public bool synpred19_DotCsharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred19_DotCsharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred7_DotCsharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred7_DotCsharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}
   	public bool synpred6_DotCsharp() 
   	{
   	    state.backtracking++;
   	    int start = input.Mark();
   	    try 
   	    {
   	        synpred6_DotCsharp_fragment(); // can never throw exception
   	    }
   	    catch (RecognitionException re) 
   	    {
   	        Console.Error.WriteLine("impossible: "+re);
   	    }
   	    bool success = !state.failed;
   	    input.Rewind(start);
   	    state.backtracking--;
   	    state.failed = false;
   	    return success;
   	}


   	protected DFA5 dfa5;
   	protected DFA10 dfa10;
   	protected DFA13 dfa13;
   	protected DFA19 dfa19;
   	protected DFA20 dfa20;
	private void InitializeCyclicDFAs()
	{
    	this.dfa5 = new DFA5(this);
    	this.dfa10 = new DFA10(this);
    	this.dfa13 = new DFA13(this);
    	this.dfa19 = new DFA19(this);
    	this.dfa20 = new DFA20(this);
	    this.dfa5.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA5_SpecialStateTransition);

	    this.dfa13.specialStateTransitionHandler = new DFA.SpecialStateTransitionHandler(DFA13_SpecialStateTransition);


	}

    const string DFA5_eotS =
        "\x41\uffff";
    const string DFA5_eofS =
        "\x01\uffff\x01\x08\x14\uffff\x01\x21\x2a\uffff";
    const string DFA5_minS =
        "\x04\x04\x02\uffff\x01\x04\x09\uffff\x01\x00\x04\x04\x01\x18\x01"+
        "\x04\x02\x00\x09\uffff\x17\x00\x08\uffff";
    const string DFA5_maxS =
        "\x01\x17\x01\x1d\x01\x11\x01\x17\x02\uffff\x01\x1d\x09\uffff\x01"+
        "\x00\x01\x17\x01\x1d\x01\x11\x01\x17\x01\x18\x01\x1c\x02\x00\x09"+
        "\uffff\x17\x00\x08\uffff";
    const string DFA5_acceptS =
        "\x04\uffff\x01\x03\x01\x04\x01\uffff\x01\x02\x01\x01\x18\uffff"+
        "\x01\x05\x1f\uffff";
    const string DFA5_specialS =
        "\x10\uffff\x01\x00\x06\uffff\x01\x01\x01\x02\x09\uffff\x01\x03"+
        "\x01\x04\x01\x05\x01\x06\x01\x07\x01\x08\x01\x09\x01\x0a\x01\x0b"+
        "\x01\x0c\x01\x0d\x01\x0e\x01\x0f\x01\x10\x01\x11\x01\x12\x01\x13"+
        "\x01\x14\x01\x15\x01\x16\x01\x17\x01\x18\x01\x19\x08\uffff}>";
    static readonly string[] DFA5_transitionS = {
            "\x01\x01\x0a\uffff\x01\x04\x01\uffff\x01\x03\x03\uffff\x02"+
            "\x04\x01\x02",
            "\x01\x08\x0a\uffff\x01\x08\x01\uffff\x03\x08\x01\x05\x04\x08"+
            "\x02\uffff\x02\x07\x01\x06",
            "\x01\x10\x0c\uffff\x01\x11",
            "\x01\x12\x0a\uffff\x01\x15\x01\uffff\x01\x14\x01\x16\x02\uffff"+
            "\x02\x15\x01\x13",
            "",
            "",
            "\x01\x17\x18\uffff\x01\x18",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\uffff",
            "\x01\x22\x0a\uffff\x01\x25\x01\uffff\x01\x24\x01\x26\x02\uffff"+
            "\x02\x25\x01\x23",
            "\x01\x2c\x0a\uffff\x01\x2f\x01\uffff\x01\x2e\x01\x2b\x01\x2a"+
            "\x01\x27\x02\x2f\x01\x2d\x01\x29\x02\uffff\x02\x30\x01\x28",
            "\x01\x31\x0c\uffff\x01\x32",
            "\x01\x33\x0a\uffff\x01\x36\x01\uffff\x01\x35\x01\x37\x02\uffff"+
            "\x02\x36\x01\x34",
            "\x01\x38",
            "\x01\x21\x0a\uffff\x01\x21\x01\uffff\x03\x21\x01\uffff\x03"+
            "\x21\x03\uffff\x02\x07",
            "\x01\uffff",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA5_eot = DFA.UnpackEncodedString(DFA5_eotS);
    static readonly short[] DFA5_eof = DFA.UnpackEncodedString(DFA5_eofS);
    static readonly char[] DFA5_min = DFA.UnpackEncodedStringToUnsignedChars(DFA5_minS);
    static readonly char[] DFA5_max = DFA.UnpackEncodedStringToUnsignedChars(DFA5_maxS);
    static readonly short[] DFA5_accept = DFA.UnpackEncodedString(DFA5_acceptS);
    static readonly short[] DFA5_special = DFA.UnpackEncodedString(DFA5_specialS);
    static readonly short[][] DFA5_transition = DFA.UnpackEncodedStringArray(DFA5_transitionS);

    protected class DFA5 : DFA
    {
        public DFA5(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 5;
            this.eot = DFA5_eot;
            this.eof = DFA5_eof;
            this.min = DFA5_min;
            this.max = DFA5_max;
            this.accept = DFA5_accept;
            this.special = DFA5_special;
            this.transition = DFA5_transition;

        }

        override public string Description
        {
            get { return "54:1: stmt : ( node_stmt | edge_stmt | attr_stmt | ID '=' ID | subgraph );"; }
        }

    }


    protected internal int DFA5_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA5_16 = input.LA(1);

                   	 
                   	int index5_16 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_16);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA5_23 = input.LA(1);

                   	 
                   	int index5_23 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred6_DotCsharp()) ) { s = 8; }

                   	else if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	 
                   	input.Seek(index5_23);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA5_24 = input.LA(1);

                   	 
                   	int index5_24 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred6_DotCsharp()) ) { s = 8; }

                   	else if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	 
                   	input.Seek(index5_24);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 3 : 
                   	int LA5_34 = input.LA(1);

                   	 
                   	int index5_34 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_34);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 4 : 
                   	int LA5_35 = input.LA(1);

                   	 
                   	int index5_35 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_35);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 5 : 
                   	int LA5_36 = input.LA(1);

                   	 
                   	int index5_36 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_36);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 6 : 
                   	int LA5_37 = input.LA(1);

                   	 
                   	int index5_37 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_37);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 7 : 
                   	int LA5_38 = input.LA(1);

                   	 
                   	int index5_38 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_38);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 8 : 
                   	int LA5_39 = input.LA(1);

                   	 
                   	int index5_39 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_39);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 9 : 
                   	int LA5_40 = input.LA(1);

                   	 
                   	int index5_40 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_40);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 10 : 
                   	int LA5_41 = input.LA(1);

                   	 
                   	int index5_41 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_41);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 11 : 
                   	int LA5_42 = input.LA(1);

                   	 
                   	int index5_42 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_42);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 12 : 
                   	int LA5_43 = input.LA(1);

                   	 
                   	int index5_43 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_43);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 13 : 
                   	int LA5_44 = input.LA(1);

                   	 
                   	int index5_44 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_44);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 14 : 
                   	int LA5_45 = input.LA(1);

                   	 
                   	int index5_45 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_45);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 15 : 
                   	int LA5_46 = input.LA(1);

                   	 
                   	int index5_46 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_46);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 16 : 
                   	int LA5_47 = input.LA(1);

                   	 
                   	int index5_47 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_47);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 17 : 
                   	int LA5_48 = input.LA(1);

                   	 
                   	int index5_48 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_48);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 18 : 
                   	int LA5_49 = input.LA(1);

                   	 
                   	int index5_49 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_49);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 19 : 
                   	int LA5_50 = input.LA(1);

                   	 
                   	int index5_50 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_50);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 20 : 
                   	int LA5_51 = input.LA(1);

                   	 
                   	int index5_51 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_51);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 21 : 
                   	int LA5_52 = input.LA(1);

                   	 
                   	int index5_52 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_52);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 22 : 
                   	int LA5_53 = input.LA(1);

                   	 
                   	int index5_53 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_53);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 23 : 
                   	int LA5_54 = input.LA(1);

                   	 
                   	int index5_54 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_54);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 24 : 
                   	int LA5_55 = input.LA(1);

                   	 
                   	int index5_55 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_55);
                   	if ( s >= 0 ) return s;
                   	break;
               	case 25 : 
                   	int LA5_56 = input.LA(1);

                   	 
                   	int index5_56 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred7_DotCsharp()) ) { s = 7; }

                   	else if ( (true) ) { s = 33; }

                   	 
                   	input.Seek(index5_56);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae5 =
            new NoViableAltException(dfa.Description, 5, _s, input);
        dfa.Error(nvae5);
        throw nvae5;
    }
    const string DFA10_eotS =
        "\x0a\uffff";
    const string DFA10_eofS =
        "\x01\x02\x09\uffff";
    const string DFA10_minS =
        "\x01\x04\x09\uffff";
    const string DFA10_maxS =
        "\x01\x1c\x09\uffff";
    const string DFA10_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x07\uffff";
    const string DFA10_specialS =
        "\x0a\uffff}>";
    static readonly string[] DFA10_transitionS = {
            "\x01\x02\x0a\uffff\x01\x02\x01\uffff\x03\x02\x01\uffff\x04"+
            "\x02\x02\uffff\x02\x01",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA10_eot = DFA.UnpackEncodedString(DFA10_eotS);
    static readonly short[] DFA10_eof = DFA.UnpackEncodedString(DFA10_eofS);
    static readonly char[] DFA10_min = DFA.UnpackEncodedStringToUnsignedChars(DFA10_minS);
    static readonly char[] DFA10_max = DFA.UnpackEncodedStringToUnsignedChars(DFA10_maxS);
    static readonly short[] DFA10_accept = DFA.UnpackEncodedString(DFA10_acceptS);
    static readonly short[] DFA10_special = DFA.UnpackEncodedString(DFA10_specialS);
    static readonly short[][] DFA10_transition = DFA.UnpackEncodedStringArray(DFA10_transitionS);

    protected class DFA10 : DFA
    {
        public DFA10(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 10;
            this.eot = DFA10_eot;
            this.eof = DFA10_eof;
            this.min = DFA10_min;
            this.max = DFA10_max;
            this.accept = DFA10_accept;
            this.special = DFA10_special;
            this.transition = DFA10_transition;

        }

        override public string Description
        {
            get { return "70:71: ( edgeRHS )?"; }
        }

    }

    const string DFA13_eotS =
        "\x0f\uffff";
    const string DFA13_eofS =
        "\x0f\uffff";
    const string DFA13_minS =
        "\x01\x11\x01\x04\x01\uffff\x01\x00\x0b\uffff";
    const string DFA13_maxS =
        "\x01\x17\x01\x11\x01\uffff\x01\x00\x0b\uffff";
    const string DFA13_acceptS =
        "\x02\uffff\x01\x01\x0b\uffff\x01\x02";
    const string DFA13_specialS =
        "\x03\uffff\x01\x00\x0b\uffff}>";
    static readonly string[] DFA13_transitionS = {
            "\x01\x02\x05\uffff\x01\x01",
            "\x01\x03\x0c\uffff\x01\x02",
            "",
            "\x01\uffff",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA13_eot = DFA.UnpackEncodedString(DFA13_eotS);
    static readonly short[] DFA13_eof = DFA.UnpackEncodedString(DFA13_eofS);
    static readonly char[] DFA13_min = DFA.UnpackEncodedStringToUnsignedChars(DFA13_minS);
    static readonly char[] DFA13_max = DFA.UnpackEncodedStringToUnsignedChars(DFA13_maxS);
    static readonly short[] DFA13_accept = DFA.UnpackEncodedString(DFA13_acceptS);
    static readonly short[] DFA13_special = DFA.UnpackEncodedString(DFA13_specialS);
    static readonly short[][] DFA13_transition = DFA.UnpackEncodedStringArray(DFA13_transitionS);

    protected class DFA13 : DFA
    {
        public DFA13(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 13;
            this.eot = DFA13_eot;
            this.eof = DFA13_eof;
            this.min = DFA13_min;
            this.max = DFA13_max;
            this.accept = DFA13_accept;
            this.special = DFA13_special;
            this.transition = DFA13_transition;

        }

        override public string Description
        {
            get { return "77:1: subgraph : ( ( 'subgraph' ( ID )? )? '{' stmt_list '}' | 'subgraph' ID );"; }
        }

    }


    protected internal int DFA13_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            ITokenStream input = (ITokenStream)_input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA13_3 = input.LA(1);

                   	 
                   	int index13_3 = input.Index;
                   	input.Rewind();
                   	s = -1;
                   	if ( (synpred19_DotCsharp()) ) { s = 2; }

                   	else if ( (true) ) { s = 14; }

                   	 
                   	input.Seek(index13_3);
                   	if ( s >= 0 ) return s;
                   	break;
        }
        if (state.backtracking > 0) {state.failed = true; return -1;}
        NoViableAltException nvae13 =
            new NoViableAltException(dfa.Description, 13, _s, input);
        dfa.Error(nvae13);
        throw nvae13;
    }
    const string DFA19_eotS =
        "\x0b\uffff";
    const string DFA19_eofS =
        "\x01\x02\x0a\uffff";
    const string DFA19_minS =
        "\x01\x04\x0a\uffff";
    const string DFA19_maxS =
        "\x01\x1d\x0a\uffff";
    const string DFA19_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x08\uffff";
    const string DFA19_specialS =
        "\x0b\uffff}>";
    static readonly string[] DFA19_transitionS = {
            "\x01\x02\x0a\uffff\x01\x02\x01\uffff\x03\x02\x01\uffff\x04"+
            "\x02\x02\uffff\x02\x02\x01\x01",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA19_eot = DFA.UnpackEncodedString(DFA19_eotS);
    static readonly short[] DFA19_eof = DFA.UnpackEncodedString(DFA19_eofS);
    static readonly char[] DFA19_min = DFA.UnpackEncodedStringToUnsignedChars(DFA19_minS);
    static readonly char[] DFA19_max = DFA.UnpackEncodedStringToUnsignedChars(DFA19_maxS);
    static readonly short[] DFA19_accept = DFA.UnpackEncodedString(DFA19_acceptS);
    static readonly short[] DFA19_special = DFA.UnpackEncodedString(DFA19_specialS);
    static readonly short[][] DFA19_transition = DFA.UnpackEncodedStringArray(DFA19_transitionS);

    protected class DFA19 : DFA
    {
        public DFA19(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 19;
            this.eot = DFA19_eot;
            this.eof = DFA19_eof;
            this.min = DFA19_min;
            this.max = DFA19_max;
            this.accept = DFA19_accept;
            this.special = DFA19_special;
            this.transition = DFA19_transition;

        }

        override public string Description
        {
            get { return "239:35: ( port )?"; }
        }

    }

    const string DFA20_eotS =
        "\x0b\uffff";
    const string DFA20_eofS =
        "\x01\x02\x0a\uffff";
    const string DFA20_minS =
        "\x01\x04\x0a\uffff";
    const string DFA20_maxS =
        "\x01\x1d\x0a\uffff";
    const string DFA20_acceptS =
        "\x01\uffff\x01\x01\x01\x02\x08\uffff";
    const string DFA20_specialS =
        "\x0b\uffff}>";
    static readonly string[] DFA20_transitionS = {
            "\x01\x02\x0a\uffff\x01\x02\x01\uffff\x03\x02\x01\uffff\x04"+
            "\x02\x02\uffff\x02\x02\x01\x01",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
    };

    static readonly short[] DFA20_eot = DFA.UnpackEncodedString(DFA20_eotS);
    static readonly short[] DFA20_eof = DFA.UnpackEncodedString(DFA20_eofS);
    static readonly char[] DFA20_min = DFA.UnpackEncodedStringToUnsignedChars(DFA20_minS);
    static readonly char[] DFA20_max = DFA.UnpackEncodedStringToUnsignedChars(DFA20_maxS);
    static readonly short[] DFA20_accept = DFA.UnpackEncodedString(DFA20_acceptS);
    static readonly short[] DFA20_special = DFA.UnpackEncodedString(DFA20_specialS);
    static readonly short[][] DFA20_transition = DFA.UnpackEncodedStringArray(DFA20_transitionS);

    protected class DFA20 : DFA
    {
        public DFA20(BaseRecognizer recognizer)
        {
            this.recognizer = recognizer;
            this.decisionNumber = 20;
            this.eot = DFA20_eot;
            this.eof = DFA20_eof;
            this.min = DFA20_min;
            this.max = DFA20_max;
            this.accept = DFA20_accept;
            this.special = DFA20_special;
            this.transition = DFA20_transition;

        }

        override public string Description
        {
            get { return "242:17: ( ':' compass_pt )?"; }
        }

    }

 

    public static readonly BitSet FOLLOW_14_in_graph47 = new BitSet(new ulong[]{0x0000000000018000UL});
    public static readonly BitSet FOLLOW_set_in_graph50 = new BitSet(new ulong[]{0x0000000000020010UL});
    public static readonly BitSet FOLLOW_ID_in_graph58 = new BitSet(new ulong[]{0x0000000000020000UL});
    public static readonly BitSet FOLLOW_17_in_graph61 = new BitSet(new ulong[]{0x0000000000E68010UL});
    public static readonly BitSet FOLLOW_stmt_list_in_graph63 = new BitSet(new ulong[]{0x0000000000040000UL});
    public static readonly BitSet FOLLOW_18_in_graph65 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_stmt_in_stmt_list81 = new BitSet(new ulong[]{0x0000000000EA8012UL});
    public static readonly BitSet FOLLOW_19_in_stmt_list83 = new BitSet(new ulong[]{0x0000000000E28012UL});
    public static readonly BitSet FOLLOW_node_stmt_in_stmt96 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_edge_stmt_in_stmt101 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_attr_stmt_in_stmt106 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_stmt112 = new BitSet(new ulong[]{0x0000000000100000UL});
    public static readonly BitSet FOLLOW_20_in_stmt114 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_ID_in_stmt116 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_subgraph_in_stmt121 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_node_id_in_node_stmt134 = new BitSet(new ulong[]{0x0000000001000002UL});
    public static readonly BitSet FOLLOW_attr_list_in_node_stmt138 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_node_id_in_edge_stmt154 = new BitSet(new ulong[]{0x0000000018000000UL});
    public static readonly BitSet FOLLOW_subgraph_in_edge_stmt160 = new BitSet(new ulong[]{0x0000000018000000UL});
    public static readonly BitSet FOLLOW_edgeRHS_in_edge_stmt163 = new BitSet(new ulong[]{0x0000000001000002UL});
    public static readonly BitSet FOLLOW_attr_list_in_edge_stmt165 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_edgeop_in_edgeRHS181 = new BitSet(new ulong[]{0x0000000000820010UL});
    public static readonly BitSet FOLLOW_node_id_in_edgeRHS184 = new BitSet(new ulong[]{0x0000000018000002UL});
    public static readonly BitSet FOLLOW_subgraph_in_edgeRHS190 = new BitSet(new ulong[]{0x0000000018000002UL});
    public static readonly BitSet FOLLOW_edgeRHS_in_edgeRHS193 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_attr_stmt206 = new BitSet(new ulong[]{0x0000000001000000UL});
    public static readonly BitSet FOLLOW_attr_list_in_attr_stmt218 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_23_in_subgraph229 = new BitSet(new ulong[]{0x0000000000020010UL});
    public static readonly BitSet FOLLOW_ID_in_subgraph231 = new BitSet(new ulong[]{0x0000000000020000UL});
    public static readonly BitSet FOLLOW_17_in_subgraph236 = new BitSet(new ulong[]{0x0000000000E68010UL});
    public static readonly BitSet FOLLOW_stmt_list_in_subgraph238 = new BitSet(new ulong[]{0x0000000000040000UL});
    public static readonly BitSet FOLLOW_18_in_subgraph240 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_23_in_subgraph245 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_ID_in_subgraph247 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_24_in_attr_list260 = new BitSet(new ulong[]{0x0000000002000010UL});
    public static readonly BitSet FOLLOW_a_list_in_attr_list262 = new BitSet(new ulong[]{0x0000000002000000UL});
    public static readonly BitSet FOLLOW_25_in_attr_list266 = new BitSet(new ulong[]{0x0000000001000002UL});
    public static readonly BitSet FOLLOW_ID_in_a_list287 = new BitSet(new ulong[]{0x0000000004100012UL});
    public static readonly BitSet FOLLOW_20_in_a_list290 = new BitSet(new ulong[]{0x0000000000000010UL});
    public static readonly BitSet FOLLOW_ID_in_a_list294 = new BitSet(new ulong[]{0x0000000004000012UL});
    public static readonly BitSet FOLLOW_26_in_a_list303 = new BitSet(new ulong[]{0x0000000000000012UL});
    public static readonly BitSet FOLLOW_set_in_edgeop0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_ID_in_node_id341 = new BitSet(new ulong[]{0x0000000020000002UL});
    public static readonly BitSet FOLLOW_port_in_node_id343 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_29_in_port356 = new BitSet(new ulong[]{0x0000000020000010UL});
    public static readonly BitSet FOLLOW_ID_in_port360 = new BitSet(new ulong[]{0x0000000020000002UL});
    public static readonly BitSet FOLLOW_29_in_port363 = new BitSet(new ulong[]{0x0000003FC0000000UL});
    public static readonly BitSet FOLLOW_compass_pt_in_port365 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_29_in_port373 = new BitSet(new ulong[]{0x0000003FC0000000UL});
    public static readonly BitSet FOLLOW_compass_pt_in_port375 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_set_in_compass_pt0 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_node_stmt_in_synpred6_DotCsharp96 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_edge_stmt_in_synpred7_DotCsharp101 = new BitSet(new ulong[]{0x0000000000000002UL});
    public static readonly BitSet FOLLOW_23_in_synpred19_DotCsharp229 = new BitSet(new ulong[]{0x0000000000020010UL});
    public static readonly BitSet FOLLOW_ID_in_synpred19_DotCsharp231 = new BitSet(new ulong[]{0x0000000000020000UL});
    public static readonly BitSet FOLLOW_17_in_synpred19_DotCsharp236 = new BitSet(new ulong[]{0x0000000000E68010UL});
    public static readonly BitSet FOLLOW_stmt_list_in_synpred19_DotCsharp238 = new BitSet(new ulong[]{0x0000000000040000UL});
    public static readonly BitSet FOLLOW_18_in_synpred19_DotCsharp240 = new BitSet(new ulong[]{0x0000000000000002UL});

}
